package com.zp.self.module.工具.rpc远程访问.forest.controller;

import com.zp.self.module.工具.rpc远程访问.forest.rpcInterface.RpcTestService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ：byH
 * @date ：Created 2022/1/16 22:47
 * @description：测试forest框架，发起RPC请求
 */
@RestController
@RequestMapping("/forest")
public class ForestRpcController {
    @Resource
    RpcTestService testServiceA;

    @RequestMapping(value = "/get",method = RequestMethod.GET)
    public Object hi(String name){
        String request = testServiceA.getRequest("张麻子");
        return request;
    }
}
